-
Notifications
You must be signed in to change notification settings - Fork 75
fix[N15] Unnecessary import statements #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: chrismaree <christopher.maree@gmail.com>
mrice32
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed LpTokenFactoryInterface
contracts/Ethereum_SpokePool.sol
Outdated
| import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | ||
|
|
||
| import "./SpokePool.sol"; | ||
| import "./SpokePoolInterface.sol"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can also remove SpokePoolInterface
contracts/Optimism_SpokePool.sol
Outdated
|
|
||
| import "./SpokePool.sol"; | ||
| import "./interfaces/WETH9.sol"; | ||
| import "./SpokePoolInterface.sol"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can remove SpokePoolInterface
| import "./SpokePool.sol"; | ||
| import "./PolygonTokenBridger.sol"; | ||
| import "./interfaces/WETH9.sol"; | ||
| import "./SpokePoolInterface.sol"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can remove SpokePoolInterface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and in the Arbitrum one!
nicholaspai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but you forgot one removal: the IERC20 in the LPTokenFactoryInterface
Problem:
The below list outlines contract import statements that are unnecessary:
The WETH9 and Lockable imports are not used in the Ethereum_Adapter contract.
The CrossDomainEnabled, IL1StandardBridge, and Lockable imports are not used in the
Polygon_Adapter contract.
The WETH9 and IERC20 imports are not used in the Arbitrum_Adapter contract.
The AdapterInterface interface is imported twice in the Arbitrum_Adapter contract.
The WETH9 and SpokePoolInterface imports are not used in the Ethereum_SpokePool contract.
The IERC20 import in the LpTokenFactoryInterface interface is unused.
The MerkleLib is imported twice in the SpokePool contract.
Solution
Removed unnecessary imports. I also changed the ordering of some of them to be more consistant (implementation, then interfaces, then external).